package com.triz.business.service.impl;

import java.util.List;
import com.triz.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.triz.business.mapper.PainPointsMapper;
import com.triz.business.domain.PainPoints;
import com.triz.business.service.IPainPointsService;

/**
 * 项目痛点Service业务层处理
 * 
 * @author hlk
 * @date 2025-11-11
 */
@Service
public class PainPointsServiceImpl implements IPainPointsService 
{
    @Autowired
    private PainPointsMapper painPointsMapper;

    /**
     * 查询项目痛点
     * 
     * @param id 项目痛点主键
     * @return 项目痛点
     */
    @Override
    public PainPoints selectPainPointsById(Long id)
    {
        return painPointsMapper.selectPainPointsById(id);
    }

    /**
     * 查询项目痛点列表
     * 
     * @param painPoints 项目痛点
     * @return 项目痛点
     */
    @Override
    public List<PainPoints> selectPainPointsList(PainPoints painPoints)
    {
        return painPointsMapper.selectPainPointsList(painPoints);
    }

    /**
     * 新增项目痛点
     * 
     * @param painPoints 项目痛点
     * @return 结果
     */
    @Override
    public int insertPainPoints(PainPoints painPoints)
    {
        painPoints.setCreateTime(DateUtils.getNowDate());
        return painPointsMapper.insertPainPoints(painPoints);
    }

    /**
     * 修改项目痛点
     * 
     * @param painPoints 项目痛点
     * @return 结果
     */
    @Override
    public int updatePainPoints(PainPoints painPoints)
    {
        painPoints.setUpdateTime(DateUtils.getNowDate());
        return painPointsMapper.updatePainPoints(painPoints);
    }

    /**
     * 批量删除项目痛点
     * 
     * @param ids 需要删除的项目痛点主键
     * @return 结果
     */
    @Override
    public int deletePainPointsByIds(Long[] ids)
    {
        return painPointsMapper.deletePainPointsByIds(ids);
    }

    /**
     * 删除项目痛点信息
     * 
     * @param id 项目痛点主键
     * @return 结果
     */
    @Override
    public int deletePainPointsById(Long id)
    {
        return painPointsMapper.deletePainPointsById(id);
    }


}
